#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
using namespace std;
const int N = 100010;
int s[N];
int n, x;
bool check(int mid)
{
    for (int i = 1; i + mid - 1 <= n - 1; i++)
    {
        if (s[i + mid - 1] - s[i - 1] < x)
        {
            return false;
        }
    }
    return true;
}
int main()
{
    cin >> n >> x;
    x *= 2;
    for (int i = 1; i <= n; i++)
    {
        cin >> s[i];
        s[i] += s[i - 1];
    }
    int l = 0, r = n;
    while (l < r)
    {
        int mid = l + r >> 1;
        if (check(mid)) r = mid;
        else l = mid + 1;
    }
    cout << r << endl;
    return 0;
}